

package system





//getSystemMenuListCount 获取功能菜单列表条数
const getSystemMenuListCount = `
select 
	count(1)
from sso_system_menu t
where`


	
//getSystemMenuList 查询功能菜单列表数据
const getSystemMenuList = `
select
	t.id,
	t.sys_id,
	t.parent,
	t.menu_type,
	t.level_id,
	t.name,
	t.path,
	t.icon,
	t.create_time,
	t.sortrank,
	t.is_open,
	t.enable,
	1
from sso_system_menu t
where
order by 
	t.id desc
limit @ps offset @offset`

// insertSystemMenu 保存功能菜单数据
const insertSystemMenu = `
insert into sso_system_menu
(
	sys_id,
	menu_type,
	name,
	path,
	icon,
	sortrank,
	is_open,
	enable
	)
values
(
	@sys_id,
	@menu_type,
	@name,
	@path,
	@icon,
	@sortrank,
	@is_open,
	@enable
	)`

//updateSystemMenu 修改功能菜单数据
const updateSystemMenu = `
update sso_system_menu t set
	t.sys_id = @sys_id,
	t.menu_type = @menu_type,
	t.name = @name,
	t.path = @path,
	t.icon = @icon,
	t.sortrank = @sortrank,
	t.is_open = @is_open,
	t.enable = @enable
where
	&id`

//getSystemMenu 查询单条功能菜单数据
const getSystemMenu = `
select
	t.id,
	t.sys_id,
	t.parent,
	t.menu_type,
	t.level_id,
	t.name,
	t.path,
	t.icon,
	t.create_time,
	t.sortrank,
	t.is_open,
	t.enable
from sso_system_menu t
where
	&id`


//deleteSystemMenu 删除单条功能菜单数据
const deleteSystemMenu = `
delete from sso_system_menu
where
	&id`